<template>
    <div>
        <Header/>
        <div >
            <div class="screen"><img src="../../../public/images/screen.png" alt=""></div>
            <div class="hallName">VIP7号哆啦A梦厅（若3D影片建议自备3D眼镜）</div>
        </div>
       
        <div class="seat">
          <div class="seat-left">
            <ul>
              <li>1</li>
              <li>2</li>
              <li>3</li>
              <li>4</li>
              <li>5</li>
              <li>6</li>
              <li>7</li>
              
            </ul>
          </div>
          <div class="seats">
            <div  class="seat-box" v-for="(v,i) in arr" :key="i" 
            @click="v.choose=!v.choose"
             :class="{choose:v.choose}">
             <img v-if="v.s" src="../../../public/images/no.png" alt="">
             <img v-if="v.ys" src="../../../public/images/yishou.png" alt="">
             </div>
          </div>  
        </div>
        <div class="shuiyin"><img src="../../../public/images/shuiyin.png" alt=""></div>
        <div class="footer">
          <div class="tips">
            <div class="box1">  <div></div><span>可选</span></div>
            <div class="box1"> <div><img src="../../../public/images/yishou.png" alt=""></div><span>已售</span></div>
            <div class="box1"><div><img src="../../../public/images/no.png" alt=""></div><span>不可售</span></div>
          </div>
          <div class="notice">
            <div class="notice-title"> 观影需全程佩戴口罩,电影放映期间影厅内禁止饮食,感谢配合！ </div>
          
          </div>
          <div class="inform">
            <div class="informtitle">怒火重案</div>
            <div class="informdate">今天 09月06日 17:25-19:33 粤语 2D</div>
            <div class="seatinfo"> 
              <!-- <span class="zuowei" v-for="(v,i) in arr" :key="i" seatinfo="v.seatinfo" :class="{choose:v.isChoose}">
                {{v.seatinfo}}
              </span> -->
              
            </div>

          </div>
          <div class="button" @click="fun2()">
            请先选座
          </div>
            
        </div>
    </div>
</template>

<script>
import getLink from "@/api/getLink.js";

import Header from "../../components/xqh/header";

export default {
   mounted() {
    getLink("/apidl/seat").then((res) => {
      this.arr = res.data;
      
    });
  },
  data(){
    return{
      arr:[],
   
    }
  },
  methods:{
    fun1(){
      
      this.isChoose=!this.isChoose
      // v.isChoose=!v.isChoose

    },
    fun2(){
      this.$router.push("/buy")
    }
  },
  components: {
    Header
  },
  
};
</script>

<style scoped>
.choose{
  background-image: url(/images/choose.png);
  background-size: 0.45rem;
  
}


.screen img {
  display: block;
  width: 64%;
  margin: 0 auto;
  
}
.hallName {
  width: 100%;
  font-size: 14px;
  text-align: center;
  color: #666
}
.seat{
  margin-top: 0.5rem;
  display: flex;
  justify-content: space-between;
}
.seat-left ul{

  background: rgb(197, 197, 197);
  border-radius: 8px;
  
}
.seat-left li{
  width: 0.3rem;
  height:0.5rem;
  margin-bottom: 0.15rem;
  text-align: center;
  color: white
}
.seat-left li:nth-child(6){
  margin: 0
}
.seats{
  width: 90%;
  display: flex;
  flex-wrap: wrap;
  margin: 0 auto
}
/* .seats li{
  display: flex;
  justify-content: space-evenly;
  margin-bottom: 0.3rem
} */
.seat-box{
  width: 0.45rem;
  height:0.45rem;
  margin-right: 0.15rem;
  border: 1px solid rgb(191, 191, 191);
  border-radius: 25%;
  /* background: #ffffff; */
 
}
.seats img{
  width: 0.46rem;
  height: 0.46rem;
}
.shuiyin img{
  width: 2.3rem;
  display: block;
  margin: 0.1rem auto
}
.tips{
  display: flex;
  justify-content: center;

}
.tips span{
  color: rgb(191, 191, 191);
}
.tips .box1 div{
  width: 0.26rem;
  height:0.26rem;
  margin-left: 0.15rem;
  border: 1px solid rgb(191, 191, 191);
  border-radius: 25%;
  display: inline-block;
}
.tips img{
  width: 0.26rem;
  height:0.26rem;
}
.notice{
  height: 0.7rem;
  width: 100%;
}
.notice-title{
  background-color: rgb(255, 249, 235);
  width: 90%;
  color: rgb(255,153,0);
  margin: 0 auto;
  font-size: 0.24rem;
  height: 0.7rem;
  padding: 0.2rem;
  border-top-right-radius: 0.24rem;
  border-top-left-radius: 0.24rem


}
.button{
  text-align: center;
  line-height: 1rem;
  color: white;
  font-size: 0.32rem;
  border-radius: 50px;
  width: 100%;
  height: 1rem;
  background-image: -webkit-linear-gradient(right,rgba(255,123,16,.98),rgba(255,154,15,.98));
}
.footer{
  position: absolute;
  bottom: 0;
  width: 100%;
}
.inform{
  width: 100%;
  padding-bottom: 0.3rem;
  border-bottom-left-radius: 0.2rem;
  border-bottom-right-radius: 0.24rem
}
.informtitle,
.informdate,
seatinfo {
  padding: 0.2rem;
  width: 90%;
  margin: 0 auto;
  background-color: #ffffff;

}
.seatinfo{
  width: 100%;
  /* display: inline-block;. */
  height: 1rem;


}
.zuowei{
  display: inline-block;

  width: 1rem;
  height: 1.1rem;
  background-color: gray;
 
  margin-left: 0.2rem;

}
.shuiyin{
  height: 6.42rem;
}

</style>
